using UnityEngine;
using System.Collections;

public class HighScoreGUI : MonoBehaviour 
{	
	// Use this for initialization
	void Start () 
	{
	
	}
	
	// Update is called once per frame
	void Update ()
	{
	
	}
	
	void OnGUI ()
	{
		
		GUI.BeginGroup (new Rect (Screen.width / 2 - 20, Screen.height / 2 - 250, 500, 500));
		
		int fstScore = PlayerPrefs.GetInt("0HScore");
		int sndScore = PlayerPrefs.GetInt("1HScore");
		int trdScore = PlayerPrefs.GetInt("2HScore");
		
		string fstName = PlayerPrefs.GetString("0HScoreName");
		string sndName = PlayerPrefs.GetString("1HScoreName");
		string trdName = PlayerPrefs.GetString("2HScoreName");
		
		GUILayout.Space(10);
		GUILayout.Label("Scores:");
		GUILayout.Space(5);
		
		GUILayout.Label("1st: - " +fstName + " - "+ fstScore.ToString());
		GUILayout.Label("2nd: - " +sndName + " - "+ sndScore.ToString());
		GUILayout.Label("3rd: - " +trdName + " - "+ trdScore.ToString());
		
		if(GUI.Button (new Rect (0,250,100,30), "Main Menu"))
		{
			Application.LoadLevel ("MainMenu");
		}

		GUI.EndGroup ();
	}
}